export default {
  data() {
    return {
      n: 0
    }
  },
  mounted() {
    this.autoRefreshHandle()
  },
  methods: {
    autoRefreshHandle() {
      clearInterval(this.n)
      this.refreshHandle()
      this.n = setInterval(() => {
        this.refreshHandle()
      }, 5000)
    }
  },
  beforeDestroy() {
    clearInterval(this.n)
  }
}
